package pwd.allen.password;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lenovo
 * @create 2021-12-12 14:57
 **/
@ConfigurationProperties("password.check")
public class PwdCheckProperties {

    /**
     * 是否校验弱密码
     */
    private boolean enabled = true;

    /**
     * 弱密码规则
     */
    private List<Condition> conds = new ArrayList<>();

    /**
     * 用来指定包装密码的工具类类名，默认为PasswordUtil
     * @see PasswordUtil
     */
    private Class<PasswordUtil> utilClassType = PasswordUtil.class;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public List<Condition> getConds() {
        return conds;
    }

    public void setConds(List<Condition> conds) {
        this.conds = conds;
    }

    public Class<PasswordUtil> getUtilClassType() {
        return utilClassType;
    }

    public void setUtilClassType(Class<PasswordUtil> utilClassType) {
        this.utilClassType = utilClassType;
    }
}
